package com.dimbottom.entity.rest;

import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;

/**
 * The interface Rest.
 *
 * @param <T> the type parameter
 * @author Dax
 * @since 22 :29  2019-04-02
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
@ApiModel
public interface Rest<T> {


    /**
     * 状态码 .
     */
    @ApiModelProperty(value = "状态码", example = "200")
    int getCode();

    /**
     * 数据载体.
     */
    @ApiModelProperty(value = "数据载体")
    T getData();

    /**
     * 提示信息.
     */
    @ApiModelProperty(value = "提示信息")
    String getMsg();

    void setMsg(String msg);

    /**
     * 错误信息
     */
    @ApiModelProperty(value = "错误信息")
    List<String> getErrors();
}
